% sample.m
% created 17/04/2012
% Crown copyright
%
% Description: Returns downsampled version of input matrix
%
% @author Kevin O'Holleran <kevin.o-holleran@npl.co.uk>
%
% @param A - matrix
% @param n - downsample ratio
%
% @return result - matrix
function [ downA ] = sample( A, n )

[d1 d2] = size(A);
downA = A(1:n:d1,:);
downA = downA(:,1:n:d2);

end

